import request from '@/utils/request'

export default {
    getList(page, limit, obj) {
        return request({
            url: `/user/list/${page}/${limit}`,
            method: 'get',
            params: obj
        })
    },

    removeById(id) {
        return request({
            url: `/user/removeById/${id}`,
            method: 'delete',
        })
    },

    removeByIds(ids) {
        return request({
            url: `/user/removeByIds`,
            method: 'delete',
            data: ids
        })
    },

    add(user) {
        return request({
            url: `/user/add`,
            method: 'post',
            data: user
        })
    },

    update(user) {
        return request({
            url: `/user/update`,
            method: 'post',
            data: user
        })
    },

    getUserById(id) {
        return request({
            url: `/user/getUserById/${id}`,
            method: 'get',
        })
    },

    changeStatus(id, status) {
        return request({
            url: `/user/changeStatus/${id}/${status}`,
            method: 'get',
        })
    }

}

